package com.lagou;

import com.lagou.entity.Position;
import com.lagou.service.PositionService;
import com.sun.javaws.Main;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import java.util.List;

@SpringBootApplication
public class Application {


    public static void main(String[] args) {
        ApplicationContext app = SpringApplication.run(Application.class, args);

        PositionService bean = app.getBean(PositionService.class);
        List<Position> java = bean.queryPositions("BD");
        java.forEach(position -> {
            System.out.println(position);
        });
    }

}
